import request from "@/utils/request"
import type { Userinfo } from "./user"

export interface LoginParams {
  username: string
  password: string
}

/***
 * @mockjs模拟数据
 */
export const loginApi = (loginParams: LoginParams) => {
  return request<Userinfo>("/user/login", "POST", loginParams)
}
export const getUserInfoApi = (token: string) => {
  return request<any>("/user", "POST", token)
}
